package Package.Example.GetsTheConstructorAndUses2;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;

public class GetsTheConstructorAndUses2 {
    public static final void GetsTheConstructorAndUses2() throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException {
Class<?> c=Class.forName("Package.Example.GetsTheConstructorAndUses.Student");
        Constructor<?> con=c.getDeclaredConstructor(String.class);
        con.setAccessible(true);
        Object obj = con.newInstance("林青霞");
        System.out.println(obj);
    }
}
